import request from '../utils/request';

/**
 * 查询会员列表
 * @param query
 * @returns {AxiosPromise}
 */
export const selectPage = query => {
    return request({
        url: 'rest/member/selectPage',
        method: 'POST',
        data: query
    });
};


/**
 * 新增会员
 * @param query
 * @returns {AxiosPromise}
 */
export const addMember = query => {
    return request({
        url: 'rest/member/insert',
        method: 'POST',
        data: query
    });
};


/**
 * 编辑会员
 * @param query
 * @returns {AxiosPromise}
 */
export const updateMember = query => {
    return request({
        url: 'rest/member/update',
        method: 'POST',
        data: query
    });
};

/**
 * 批量编辑会员
 * @param query
 * @returns {AxiosPromise}
 */
export const updateMemberList = query => {
    return request({
        url: 'rest/member/updateMemberList',
        method: 'POST',
        data: query
    });
};

/**
 * 删除会员
 * @param query
 * @returns {AxiosPromise}
 */
export const delMember = query => {
    return request({
        url: 'rest/member/delete',
        method: 'POST',
        data: query
    });
};

/**
 * 删除会员List
 * @param query
 * @returns {AxiosPromise}
 */
export const deleteList = query => {
    return request({
        url: 'rest/member/deleteList',
        method: 'POST',
        data: query
    });
};

/**
 * 查询会员
 * @param query
 * @returns {AxiosPromise}
 */
export const getMemberByID = query => {
    return request({
        url: 'rest/member/getById/' + query,
        method: 'POST',
    });
};

// /**
//  * 导出
//  * @param query
//  * @returns {AxiosPromise}
//  */
// export const exportMember = query => {
//     return exportMethod({
//         url: 'rest/member/exportMember',
//         method: 'POST',
//         responseType: "blob",
//         data: query
//     });
// };
